<!--
 * @Author: your name
 * @Date: 2021-06-25 15:00:59
 * @LastEditTime: 2021-06-25 15:29:37
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \cloneStudy\VUEDEMO\vue模板语法\01-文本插值.html
-->
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <script src="https://cdn.jsdelivr.net/npm/vue@2.6.14/dist/vue.js"></script>
    <style>
        .class1 {
            width: 100px;
            height: 100px;
            background-color: aqua;
            border: 2px solid saddlebrown;
        }
        
        #list-1 {
            width: 50px;
            height: 50px;
            background-color: aqua;
            border: 5px solid salmon;
        }
    </style>
</head>

<body>
    <div id="app">
        <!-- 插入文本 -->
        <p>{{message}}</p>
        <!-- 输出html v-html -->
        <div v-html="message"></div>
        <!-- 属性赋值 v-bind:属性名{'值名':'值'} -->
        <div v-bind:class="{'class1':'con'}"></div>
        <!-- 表达式 完成支持原生js-->

        {{5+5}}<br /> {{ok ? 'yes':'no'}} <br /> {{message.split('').reverse().join('')}}
        <div v-bind:id="'list-'+id">一个测试</div>

    </div>
    <script>
        new Vue({
            el: "#app",
            data: {
                message: "<h1>我的一 个 测 试</h1>",
                con: false,
                ok: true,
                id: 1,
            },
        });
    </script>
</body>

</html>